.block-chart {
  &__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1rem;

    span {
      @include body-small;
    }

    select {
      cursor: pointer;
      @include body-small;
      color: var(--neutral-30);
      width: unset;
      margin: 0;
      background: none;
      border: none;
      text-align: right;

      option {
        padding: 0;
      }
    }

    h3 {
      @include title-medium;
      margin: 0;
    }
  }

  &__expand {
    a,
    span {
      @include body-small;
      flex: 1;
      line-height: 1rem;
      color: var(--neutral-30);
    }

    display: flex;
    justify-content: center;
    text-align: center;
    margin-top: 0.5rem;

    position: relative;
  }

  &__list {
    --scrollbar-w: 0.5rem;

    padding-bottom: 1rem;
    margin: 0;
    counter-reset: item;
    display: flex;
    row-gap: 1rem;
    flex-flow: column;
    overflow-y: scroll;
    margin-left: calc(var(--p) * -1);
    padding-left: var(--p);
    flex: 1;

    overscroll-behavior: contain;
    scrollbar-color: transparent transparent;
    scrollbar-width: thin;

    &:hover {
      scrollbar-color: var(--primary-200) transparent;
      &::-webkit-scrollbar-thumb {
        background-color: var(--primary-200);
        &:hover {
          background-color: var(--primary-400);
        }
      }
    }

    &::-webkit-scrollbar {
      width: var(--scrollbar-w);
      background: transparent;
    }

    &::-webkit-scrollbar-track {
      background: transparent;
    }

    &::-webkit-scrollbar-thumb {
      background-color: transparent;
      border-radius: var(--rounded-full);
    }
  }

  &__item {
    display: flex;
    position: relative;
    padding-left: 1.25rem;
    column-gap: 0.5rem;
    width: 100%;
    box-sizing: border-box;

    &:first-child {
      .block-chart__img {
        img {
          width: 4em;
        }
      }
    }

    img.emoji {
      height: 1rem;
      width: auto;
    }

    &:before {
      content: counter(item) ".";
      counter-increment: item;
      position: absolute;
      left: -0.375rem;
      top: 0;
      width: 2ch;
      @include body-medium;
      text-align: right;
    }
  }

  &__img {
    a {
      display: block;
    }
    img {
      width: 2rem;
      height: auto;
    }
  }

  &__info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    font-size: 0.875rem;
    overflow: hidden;
  }

  &__title {
    display: inline-flex;
    a {
      color: var(--neutral-10);
      @include body-medium;

      &:hover {
        text-decoration: underline;
      }
    }
  }

  &__avatar {
    margin: 0.375rem 0;
  }

  &__metadata {
    display: inline-flex;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  &__details {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    @include body-small;
    color: var(--neutral-30);

    img.avatar {
      width: 1rem;
      height: 1rem;
    }

    .relative-date {
      &:after {
        content: "\00a0·\00a0";
      }
    }

    .badge-category__wrapper {
      .badge-category {
        display: contents;
        &:before {
          display: none;
        }
        .badge-category__name {
          @include body-small;
          color: var(--neutral-30);
        }
      }
    }
  }

  &__stats {
    display: flex;
    gap: 0.375rem;
    list-style: none;
    align-items: baseline;
    margin: 0;
    li {
      a {
        display: inline-flex;
        align-items: center;
        gap: 0.125rem;
        color: var(--neutral-10);
        height: 1.25rem;
        padding: 0 0.25rem;
        box-sizing: border-box;
        border: var(--border-outer);
        border-radius: var(--rounded-md);
        @include label-small;

        span {
          padding: 0 0.0625rem;
        }
      }
    }
  }
}
